#ifndef COLUMNWIDGET_H
#define COLUMNWIDGET_H

#include <QWidget>

class QLabel;
class QToolButton;
class QPaintEvent;
class QEnterEvent;
class QEvent;


class ColumnWidget : public QWidget
{
    Q_OBJECT
public:
    explicit ColumnWidget(const QString& title, QWidget *parent = nullptr);

protected:
    void paintEvent(QPaintEvent* event)override;
    void enterEvent(QEnterEvent* event)override;
    void leaveEvent(QEvent* event)override;

private:
    void layoutUI();

private:
    QLabel* title_label;
    QToolButton* play_toolButton;
    QToolButton* adjust_toolButton;
    QToolButton* refresh_toolButton;
    QToolButton* more_toolButton;
    QWidget* column_widget;

};


class ItemListWidget:public QWidget{
    Q_OBJECT
public:
    ItemListWidget(const QPixmap& coverPix,const QString& name,const QString& author,QWidget*parent=nullptr);
protected:
    void paintEvent(QPaintEvent* event)override;
    void enterEvent(QEnterEvent* event)override;
    void leaveEvent(QEvent* event)override;

private:
    void layoutUI();

private:
    QLabel* cover_label;
    QLabel* name_label;
    QLabel* author_label;
    QToolButton* play_toolButton;
    QToolButton* like_toolButton;
    QToolButton* more_toolButton;
};

#endif // COLUMNWIDGET_H
